<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page import="java.io.StringWriter" %>
<%@ page import="java.io.PrintWriter" %>
<%@ page contentType="text/html;charset=ISO-8859-1" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pt" lang="BR">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
    <meta http-equiv="Cache-Control" content="No-Cache"/>
    <meta http-equiv="Pragma" content="No-Cache"/>
    <meta http-equiv="Expires" content="0"/>
    <tiles:insert attribute="styles"/>
    <tiles:insert attribute="javascript"/>
    <title><fmt:message key="page.title"/></title>
  </head>
  <body>
    <div id="container">
      <div id="content">
        <c:catch var="exception">
          <tiles:insert attribute="messages"/>
          <tiles:insert attribute="content"/>
        </c:catch>
        <c:if test="${not empty exception}">
          <h3 class="errorTitle"><fmt:message key="errors.jspException.title"/></h3>
          <%
            StringWriter writer = new StringWriter();
            PrintWriter printWriter = new PrintWriter(writer);
            ((Throwable) pageContext.getAttribute("exception")).printStackTrace(printWriter);
          %>
          <c:set var="stackTrace" value="<%=writer.toString()%>"/>
          <pre id="stackTrace"><c:out value="${stackTrace}" escapeXml="true"/></pre>
          <div style="text-align: center;">
            <input type="button" class="button" value="<fmt:message key="button.back"/>" onclick="history.back(-1);"/>
          </div>
        </c:if>
      </div>
    </div>
  </body>
</html>